package com.moli.iov.exception;

/**
 * <p>
 *  自定义运行时异常
 * </p>
 *
 * @Auther: zql
 * @Date: 2019/1/2 17:50
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = -2964851871181700073L;
    private String code;
    private Object data;

    public BusinessException(){
      super();
    }

    public BusinessException(String message){
        super(message);
    }

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }
    
    public BusinessException(Integer code, String message) {
    	super(message);
    	this.code = String.valueOf(code);
    }

    public BusinessException(Integer code, String message, Integer level) {
        super(message);
        this.code = String.valueOf(code);
    }

    public BusinessException(String code, String message, Object data, Integer level) {
        super(message);
        this.code = code;
        this.data = data;
    }

    public BusinessException(String code, String message, Throwable t, Integer level) {
        super(message, t);
        this.code = code;
    }
    
    public BusinessException(String code, String message, Throwable t) {
    	super(message, t);
    	this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}
